
import * as setting from '@/config/setting.js'

export const get = (urls, data = {}) => {
  return new Promise((resolve, reject) => {
    uni.request({
		url:urls,
		data:data,
		method: 'GET',
		header: {
			'content-type': 'application/json'
		},
		success: (res) => {
			resolve(res)
		},
		fail: (err) => {
			reject(err)
		}, 
		complete: () => {
			// 隐藏loadings
			setTimeout(function () {
				uni.hideLoading();
			}, 1000);
		}
    })
  })
}